package org.shunya.duplicatefileperquisitor.model;

public class FileName {
    private final String fileName;

    private FileName(String fileName) {
        this.fileName = fileName;
    }

    public static FileName fileName(String fileName) {
        return new FileName(fileName);
    }

    public String getFileName() {
        return fileName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        FileName fileName1 = (FileName) o;

        if (!fileName.equals(fileName1.fileName)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return fileName.hashCode();
    }
}
